//David Wasser
//February 18, 2009
//Software Design, Period 6
//Ultimate Frisbee

/* PlayerRoutine is the abstract class that is the super class for
 * all of the MovementRoutines that control computer players.  These
 * routines are orchestrated by the associated Strategy.
 */
import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;
public abstract class PlayerRoutine implements MovementRoutine{
	protected Point3d point;
	protected Point3d goal;
	protected Vector3d vec;
	protected Vector3d dir;
	protected boolean airborn;
	protected boolean catching;
	protected Player player;
	protected Field field;
	protected Strategy strat;
	protected Disc heldDisc = null;
	
	/** Returns whether or not the associated player is holding the Disc.
	 **/
	public boolean hasDisc()
	{
		return heldDisc != null;
	}//End hasDisc()
	
	/** Called when the Player catches the disc to set heldDisc to the Disc.
	 **/
	public void caughtDisc(Disc d)
	{
		heldDisc = d;
	}//End caughtDisc()
	
	/** Sets the point that the Player is moving to to an input point
	 ** where they can catch the Disc.
	 **/
	public void setCatching(Point3d catchPoint){
		goal = catchPoint;
		catching = true;
	}//End setCatching()
	
	/** Sets the field to the input Field.
	 **/
	public void setField(Field gameField){
		field = gameField;
	}//End setField()
}//End PlayerRoutine